﻿#region Copyright
/* © 2008 George Tsiokos, licensed under the Microsoft Reciprocal License (Ms-RL) */
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Comet.Net {
    internal static class NetTrace {

		#region Fields (1) 

        [ThreadStatic]
        private static TraceSource __trace;

		#endregion Fields 

		#region Properties (1) 

        public static TraceSource TraceSource {
            get {
                if (null == __trace)
                    __trace = new TraceSource (typeof (NetTrace).Namespace);
                return __trace;
            }
        }

		#endregion Properties 

		#region Methods (5) 


		// Private Methods (5) 

        public static void Critical (string message, params object[] args) {
            TraceSource.TraceEvent (TraceEventType.Critical, 0, message, args);
        }

        public static void Information (string message, params object[] args) {
            TraceSource.TraceEvent (TraceEventType.Information, 0, message, args);
        }

        public static void Verbose (string message, params object[] args) {
            TraceSource.TraceEvent (TraceEventType.Verbose, 0, message, args);
        }

        [Conditional ("DEBUG")]
        public static void VerboseDebug (string message, params object[] args) {
            TraceSource.TraceEvent (TraceEventType.Verbose, 0, message, args);
        }

        public static void Warning (string message, params object[] args) {
            TraceSource.TraceEvent (TraceEventType.Warning, 0, message, args);
        }


		#endregion Methods 

    }
}